<%@page import="entities.AdsenseAdv"%>
<%@page import="java.util.TreeMap"%>
<%@page import="helpers.UrlHelper"%>

<%
TreeMap<String, String> check = (TreeMap<String, String>) request.getAttribute("check");
AdsenseAdv ads = (AdsenseAdv) request.getAttribute("ads");
String name = (String) request.getAttribute("name");
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<jsp:include page="/admin/layouts/header.jsp" />

				
				<jsp:include page="/admin/elements/heading_panel.jsp" />

                <!-- Build page from here: -->
                <div class="row-fluid">
					<div class="span12">
						<jsp:include page="/admin/elements/message_box.jsp" />
					
                    	<div class="box">
                        	<div class="title">
                            	<h4> 
                                	<span>Size <%=name %></span>
                            	</h4>
							</div>

							 <form class="form-horizontal" method="post">
	                             <div class="content">
	                                 
	                                 <div class="form-row row-fluid">
	                                	<div class="span12">
	                                    	<div class="row-fluid">
	                                        	<label class="form-label span3" for="normal">Name</label>
	                                            <input type="text" name="name" class="span9 <%=check.get("name") != null ? "error" : "" %>" value="<%=ads.getName()%>" />
	                                            <% if (check.get("name") != null) { %>
	                                            <label class="error" for="required" generated="true"><%=check.get("name") %></label>
	                                            <% } %>
											</div>
										</div>
									 </div>
									
									
									 <div class="form-row row-fluid">
	                                	<div class="span12">
	                                    	<div class="row-fluid">
	                                        	<label class="form-label span3" for="normal">Content</label>
	                                        	<div class="controls-textarea span9">
		                                            <textarea name="content" class="span12 <%=check.get("content") != null ? "error" : "" %>" rows="6"><%=ads.getContent() %></textarea>
		                                            <% if (check.get("content") != null) { %>
		                                            <label class="error" for="required" generated="true"><%=check.get("content") %></label>
		                                            <% } %>
		                                        </div>
											</div>
										</div>
									 </div>
									                                       
	                                 
	                                 <div class="form-actions">
	                                	<button type="submit" class="btn btn-info">Save</button>
	                                    <button type="reset" class="btn">Reset</button>
									</div>  
	                             </div>
                             </form>
						</div><!-- End .box -->

					</div><!-- End .span12 -->

				</div><!-- End .row-fluid -->
                
<jsp:include page="/admin/layouts/footer.jsp" />